import { httpGet, httpPost, httpDelete, httpPut } from '@/http'
import { services } from '@/config'

export const getPage = data => httpPost(`${services.personnelService}bookCategory/page`, data)

export const getTree = () => httpGet(`${services.personnelService}bookCategory/tree`)

export const save = data => httpPost(`${services.personnelService}bookCategory`, data)

export const load = id => httpGet(`${services.personnelService}bookCategory/${id}`)
export const create = () => httpGet(`${services.personnelService}bookCategory/create`)

export const delObj = id => httpDelete(`${services.personnelService}bookCategory/${id}`)

export const update = data => httpPut(`${services.personnelService}bookCategory`, data)

export const batchDelete = ids => httpDelete(`${services.personnelService}bookCategory/batchDelete`, ids, null, false)
